From 5c23498926626385ea51a774ea1a5d0e5c35ab77 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 29 Jul 2008 10:42:30 +0100 Subject: [PATCH] x86: reprogram LAPIC timer in pit_broadcast_exit Thus to remove possible timer expiring delay caused by deep C state LAPIC timer stopping. Signed-off-by: Wei Gang --- xen/arch/x86/time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 570a630884..1c73840b61 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1135,7 +1135,10 @@ void pit_broadcast_enter(void) void pit_broadcast_exit(void) { - cpu_clear(smp_processor_id(), pit_broadcast_mask); + int cpu = smp_processor_id(); + + if ( cpu_test_and_clear(cpu, pit_broadcast_mask) ) + reprogram_timer(per_cpu(timer_deadline, cpu)); } int pit_broadcast_is_available(void) -- 2.30.2